<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp"%>


<SCRIPT type="text/javascript">
		
		var setting = {
			view: {
				dblClickExpand: false
			},

			data: {
				key: {
					name: "name"
				},
				simpleData: {
					enable: true,
					idKey: "id",
					pIdKey: "parentId"
					
				}
			},
			callback: {
				onClick: onClick
			}
		};
		var zNodes = ${pubTablelist};
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeMenu"), setting, zNodes);
			var zTree = $.fn.zTree.getZTreeObj("treeMenu");
			zTree.expandAll(true);
		});
		
		function onClick(e,treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("treeMenu");
			var sNodes = zTree.getSelectedNodes();
			if (sNodes.length > 0) {
				var tId = sNodes[0].id;
				$.bringBack({id:tId, name:sNodes[0].name});
			}
		}
		
	</SCRIPT>

		<div layoutH="10" style="display:block; overflow:auto;width:240px; border:solid 1px #CCC; line-height:21px; background:#fff">
				    <div>
						<ul id="treeMenu" class="ztree"></ul>
					</div>
				    
				</div>

